package Inherit;

/**
 * User:langchen
 * Date:2022-08-06
 * Time:9:21
 */
public class Demo2 {
    public String name;
    public int age;
    public void eat(){

        System.out.println(name+"正在吃东西");
    }

}
class Dog extends Demo2{
    public String silly;
    public void houseGuard(){

        System.out.println(name+"看家护院");
    }
}
class Cat extends Demo2{
    public String mouse;
   public void mouseCatch(){
       System.out.println("抓老鼠");
   }
}

